import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/mogu-admin/auth/login',
    method: 'post',
    params: data
  })
}

export function getInfo() {
  return request({
    url: '/mogu-admin/auth/info',
    method: 'get'
  })
}

export function getMenu() {
  return request({
    url: '/mogu-admin/auth/getMenu',
    method: 'get'
  })
}

export function logout() {
  return request({
    url: '/mogu-admin/logout',
    method: 'post'
  })
}


////////////////////////////////////
export function getUserList(params) {
  return request({
    url: '/mogu-admin/user/getList',
    method: 'post',
    data: params
  })
}

export function addUser(params) {
  return request({
    url: '/mogu-admin/user/add',
    method: 'post',
    data: params
  })
}


export function editUser(params) {
  return request({
    url: '/mogu-admin/user/edit',
    method: 'post',
    data: params
  })
}

export function deleteUser(params) {
  return request({
    url: '/mogu-admin/user/delete',
    method: 'post',
    data: params
  })
}

export function resetUserPassword(params) {
  return request({
    url: '/mogu-admin/user/resetUserPassword',
    method: 'post',
    data: params
  })
}
